﻿
@{
    ViewBag.Title = "EnrollIndex";
    Layout = "~/Views/SharedHead/Enroll.cshtml";
}


<div class="ZC-form">
    <form action="/Enroll/EnrollIndex" method="post">
        <div class="ZC-potian">
            <h2>欢迎回来，我的朋友！！！</h2>
            @*<input type="text" id="Zc-WBID" placeholder="请输入您账号不可更改的编号!" required><br>*@
            <input type="text" name="WBName" id="Zc-DengLu" placeholder="请输入您所希望的账号!" required><br>
            <input type="password" name="WBPWD" id="Zc-MiMa" placeholder="请输入您所希望的密码!" required><br>
            <input type="text" id="Zc-CVMiMa" placeholder="确认输入密码无误!" required><br />
            <span id="confirm_tishi" style="color:#ff006e;"></span>
            <br>
        </div>
        <button type="submit" id="Zc-Btn">注册</button>
    </form>
    <button type="button" id="Qx-Btn" onclick="window.location='/Music/MusicIndex'">返回</button>
</div>

<script type="text/javascript">
    // function checkuser(){
    // 	var user=document.getElementById("txtuser").value;
    // 	console.log(user);
    // }
    var f2;

    $("#Zc-CVMiMa").blur(function () {
        var pwd = $("#Zc-MiMa").val();
        var confirmpwd = $(this).val();
        var confirm_tishi = $("#confirm_tishi");
        if (confirmpwd != pwd) {
            confirm_tishi.html("两次密码不一致")
            f2 = false;
        } else {
            confirm_tishi.html("")
            f2 = true;
        }
    })

    $("form").submit(function () {
        //如果f1 f2 f3都为true的情况下，执行if内的语句
        if (f1 && f2 && f3) {
            return true;
        } else {
            return false;
        }
    })
</script>